<?php
@session_start();
foreach (glob("_CORE/_CLASS/peer/*.php") as $filename)
{
	//echo $filename."<br />";
	include $filename;
}

foreach (glob("_CORE/_CLASS/*.php") as $filename)
{
	//echo $filename."<br />";
	include $filename;
}
include("config.php");
$db		=	new	lg_mysql($host,$dbuser,$dbpass,$csdl);
include("func.php");
$THANHVIEN["id"] = 0;
include("z_includes/dem_online.php");
if (empty($act)) $act = "home";
if ( !in_array($act, array(
		'home', 'contact', 'tours', 'tour_detail', 'tour_search', 'search', 'tour_customize', 'login', 'hotel', 
		'hotel_detail', 'news', 'news_detail', 'partner', 'partner_detail', 'transfer', 'member', 'order', 'customer',
		'services'
		
	) ) ) 
{
	$act = "home";
}
$member = new User();
if (isset($_SESSION['member_username']))
{
	$member->setusername($_SESSION['member_username']);
	$member->setpassword($_SESSION['member_password']);
	$member = User::authenticate($member);
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include "z_includes/_html_head.php"; ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body onload="pageLoad();">
<div  id="lay_thong_tin_nam_hinh">
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="container">
    <div class="banner">
    	<img src='/images/logo.png' />
        <div class='buttonLogin' style='<?=($member->getusername())?"right:70px;":""?>cursor:pointer;'>
        	<?
			if ($member->getusername()) echo "<a href='/thanh-vien/du-lich-da-nang.html'>".$member->getname()."</a>";
			else echo "<a href='/login/du-lich-da-nang.html'>Đăng nhập</a>";
			?>
        </div>
        <?
		if ($member->getusername()) 
		{
		?>
	        <div class='buttonLogin' style='right:0px;cursor:pointer;'>
	        	<a onclick='signout()'>Thoát</a>
            </div>
        <?
		}
		?>
    </div><!--End banner-->
    
    <div class="body">
    	<? include('z_includes/menu.php') ?>
        <div class='main_content'>
        	<? include('z_modules/'.$act.'.php'); ?>
        </div><!--End main content-->   
    </div><!--End body-->   
	
</div> 

<div style='width:100%;'>
	<div class="copyright">
        <div class="div_1">
        	<div>
            	<a href='/' >Trang chủ</a> &nbsp; | &nbsp; 
				<? 
					$categories = Category::getAllCategories();
					foreach ($categories as $category)
					{	
				?>
                <a href='/tours/<?=$category->getid()?>/<?=lg_string::get_link($category->getname())?>'><?=($category->getname())?></a> &nbsp; | &nbsp; 
                <?
					}
				?>
                <a href=''>Khách sạn</a> &nbsp; | &nbsp; <a href=''>Phương tiện</a> &nbsp; | &nbsp; <a href='/lien-he/du-lich-da-nang.html'>Liên hệ</a>
            </div>
            <div>
            	Bản quyền thuộc về TopGlobalTravel &copy;
            </div>
        </div>
    </div>
</div>
<div class="thoangbao_mgs" >
	<div id="luu_result"></div>
</div> 

<div class="popup_photo" id="popup_photo" >
	<div id="show_thong_tin"></div>
</div> 
 
<div id="loading_result" style="z-index:999999;"></div>
<div id="khung_bg_view" ></div>
</div>
</body>
</html>